package com.havey.ye;

/**
 * @author huaiwei.com.havey.ye
 * @description: 简单工厂测试
 * @date 2021/2/9 15:30
 */
public class OperationMain {
    public static void main(String[] args) {
        Operation operation=null;
        operation= OperationFactory.createOperation("+");
        operation.setNumberA(1);
        operation.setNumberB(2);
        double result = operation.getResult();
        System.out.println("加法运算结果："+result);
/*        operation=OperationFactory.createOperation("-");
        double result = operation.getResult();
        System.out.println("减法运算结果："+result);
        operation=OperationFactory.createOperation("*");
        double result = operation.getResult();
        System.out.println("乘法运算结果："+result);
        operation=OperationFactory.createOperation("/");
        double result = operation.getResult();
        System.out.println("除法运算结果："+result);*/
    }
}
